//
//  BaseViewController.m
//  EconomyDemo
//
//  Created by qianfeng01 on 15/7/12.
//  Copyright (c) 2015年 xiangmu. All rights reserved.
//

#import "BaseViewController.h"

#import "TopView.h"
#import "DetailViewController.h"
#import "PictureModel.h"

#define kScreenSize [UIScreen mainScreen].bounds.size
@interface BaseViewController ()<UITableViewDataSource,UITableViewDelegate>
@property (nonatomic,strong) TopView *scrollerView;
@property (nonatomic,strong) UIPageControl *pageControl;
@property (nonatomic,strong) NSMutableArray *dataArray;
@property (nonatomic,strong) UITableView *tableView;
@end

@implementation BaseViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
}
-(NSMutableArray *)dataArray
{
    if (self.dataArray==nil) {
        self.dataArray=[[NSMutableArray alloc]init];
    }
    return _dataArray;
}

-(void)addScrollView:(NSMutableArray *)imageNames title:(NSMutableArray *)titleNames {
    
    [self.tableView addSubview:self.pageControl];
    self.scrollerView=[[TopView alloc] initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, 170)];
    self.scrollerView.delegate=self;
    self.scrollerView.showsHorizontalScrollIndicator=NO;
    self.scrollerView.imageNames=imageNames;
    self.scrollerView.titleNames=titleNames;
    
    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] init];
    [tap addTarget:self action:@selector(tap:)];
    [self.scrollerView addGestureRecognizer:tap];
    
    self.tableView.tableHeaderView=self.scrollerView;
}
- (void)tap:(UIGestureRecognizer *)tap{

}
@end
